<template>
<div class="newest" v-loading="loading">
    <ul class="infinite-list">
            <li class="newest_li" v-for="date in list" :key="date.id">
                <!-- 图 -->
                <div class="newest_img">
                    <router-link to="/details">
                        <img :src="date.img_src" alt="">
                    </router-link>
                </div>
                <!-- 文字 -->
                <div class="newest_text">
                    <div class="date_title">
                      <router-link :to="{path:'/details',query:{id:date.id}}">{{date.title}}</router-link>
                    </div>
                    <div class="date_content">
                      <router-link :to="{path:'/details',query:{id:date.id}}" >{{date.content}}</router-link> 
                    </div>
                    <div class="date_line">
                        <ul class="nav-tabs">
                            <li class="bloger" >
                                <span class="el-icon-s-custom"></span>
                                <router-link :to="{path:'/About',query:{id:date.id}}" >{{date.author}}</router-link>
                            </li>
                            <li>
                                <span class="el-icon-time"></span>
                                <span class="_time">{{date.last_reply_at}}</span>
                            </li>
                            <li>
                                <span class="el-icon-view"></span>
                                <span class="_page">{{date.browse}}</span>  
                            </li>
                            <li class="pl">
                                <span class="el-icon-s-comment"></span>
                                  <router-link :to="{path:'/details',query:{id:date.id}}" >{{date.comment}}</router-link>
                            </li>
                        </ul>
                    </div>
                </div>
        </li>
    </ul>
</div>
</template>
<script>
export default {
  props: ["list"],
    data(){
      return {
        newList:[{
          id:"0412",
          img_src: require('../assets/lb01.png'),
          title: '测试文档',
          content: '测试内容，内容内容内容内容内容内容内容',
          author: '###3',
          date: '2019-06-06 06:06:06',
          browse:5555,
          comment:333
      },{
        id:"785155",
        img_src: require('../assets/lb02.png'),
        title: '2222222',
        content: '33333333333333333333333333',
        author: '###3',
        date: '2019-06-06 06:06:06',
        browse:5555,
        comment:333
      },{
        id:"785175",
        img_src: require('../assets/lb03.jpg'),
        title: '2222222',
        content: '33333333333333333333333333',
        author: '###3',
        date: '2019-06-06 06:06:06',
        browse:5555,
        comment:333
      },{
        id:"785165",
        img_src: require('../assets/lb01.png'),
        title: '2222222',
        content: '33333333333333333333333333',
        author: '###3',
        date: '2019-06-06 06:06:06',
        browse:5555,
        comment:333
      },{
        id:"785125",
        img_src: require('../assets/lb02.png'),
        title: '2222222',
        content: '33333333333333333333333333',
        author: '###3',
        date: '2019-06-06 06:06:06',
        browse:5555,
        comment:333
      },{
        id:"785195",
        img_src: require('../assets/lb01.png'),
        title: '2222222',
        content: '33333333333333333333333333',
        author: '###3',
        date: '2019-06-06 06:06:06',
        browse:5555,
        comment:333
      }
      ],
      loading: false,
    }
    
    },
    methods:{
        
    },


}
</script>

<style>
.newest{
    text-align: left;
}
.newest .newest_li {
  margin-top: 18px;
  padding-bottom: 12px;
}
.newest .newest_li:last-child {
  padding-bottom: 10px;
}
.newest .newest_li .newest_img {
  float: left;
  width: 21%;
  height: 140px;
  border-radius: 20px;
  margin-left: 10px;
  overflow: hidden;
  margin-top: 5px;
}
.newest_img a img{
    width: 100%;
    height: 100%;
}
.newest .newest_li .newest_text {
  float: left;
  width: 75%;
  margin-left: 15px;
}
.newest .newest_li .newest_text .date_title {
  margin-top: 5px;
  white-space: nowrap;
  /*规定段落中的文本不进行换行 */
  overflow: hidden;
  /*超出部分隐藏*/
  text-overflow: ellipsis;
  /* 超出部分显示省略号 */
}
.newest .newest_li .newest_text .date_title a{
    color: #424242;
    font-size: 18px;
    font-weight: 600;
}
.newest .newest_li .newest_text .date_content a {
    display: -webkit-box;
    margin-top: 8px;
    height: 60px;
    color: #424242;
    /* 多行文本省略号 */
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    overflow:hidden;
}
.newest .newest_li .newest_text .date_content > a {
  color: #424242;
  font-size: 14px;
}
.newest .newest_li .newest_text .date_line {
  margin-top: 32px;
}
.newest .newest_li .newest_text .date_line > ul > li:first-child {
  margin-left: 0;
}
.newest .newest_li .newest_text .date_line > ul > li > span:first-child {
  color: #1c5fc4;
}
.newest .newest_li .newest_text .date_line > ul .pl > span:first-child {
  color: #e9c13c;
}
.newest .newest_li .newest_text .date_line span {
  margin-left: 2px;
  font-size: 13px;
  color: #8b8888;
}
.newest .newest_li::after {
  content: '';
  display: block;
  clear: both;
}
.bloger a,
.newest .newest_li .newest_text .date_line .pl a{
    font-size: 12px;
    color: #8b8888;
}
.nav-tabs > li {
    float: left;
    margin-right: 38px;
}
.nav-tabs{
    content: '';
    display: block;
    clear: both;
}
</style>